package com.bdqn.design;

import com.bdqn.design.proxy.Buyer;
import com.bdqn.design.proxy.RealBuyer;
import com.bdqn.design.proxy.cglib.IntermediaryCGLIBProxyFactory;

/**
 * Test07ProxyDynamicCGLIB（使用CGLIB实现动态代理）
 *
 * @author LILIBO
 * @since 2023-10-10
 */
public class Test07ProxyDynamicCGLIB {

    public static void main(String[] args) {
        // 使用CGLIB实现动态代理
        Buyer buyer = IntermediaryCGLIBProxyFactory.create(RealBuyer.class);
        String result = buyer.havealook();
        System.out.println("[返回结果]：" + result);
    }

}
